﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;

namespace ExpenseSystem.Model
{
    [TableName("BAS_PRODUCTION")]
    public class ProductionModel: NormalModel
    {
        private string _code;
        private string _name;
        private string _specification;
        private long _unitgroupid;
        private long _unitid;
        private long _salesunitid;
        private long _blandid;
        private long _seriesid;
        private long _productiontypeid;
        private bool _promotion;
        private bool _spare;
        private bool _virtual;
        private bool _free;
        private bool _subparts;
        private string _searchcodel;
        private string _barcode;
        private decimal _rate;
        [Export("产品编号")]
        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }
        [Export("产品名称")]

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;
                _name = value;
                if (!PropertyUpdated.Contains("Name"))
                    PropertyUpdated.Add("Name");
            }
        }
        [Export("规格")]

        public virtual string Specification
        {
            get { return _specification; }
            set
            {
                if (_specification == value)
                    return;
                _specification = value;
                if (!PropertyUpdated.Contains("Specification"))
                    PropertyUpdated.Add("Specification");
            }
        }
        public virtual long UnitGroupId
        {
            get { return _unitgroupid; }
            set
            {
                if (_unitgroupid == value)
                    return;
                _unitgroupid = value;
                if (!PropertyUpdated.Contains("UnitGroupId"))
                    PropertyUpdated.Add("UnitGroupId");
            }
        }
        public virtual long UnitId
        {
            get { return _unitid; }
            set
            {
                if (_unitid == value)
                    return;
                _unitid = value;
                if (!PropertyUpdated.Contains("UnitId"))
                    PropertyUpdated.Add("UnitId");
            }
        }
        public virtual long SalesUnitId
        {
            get { return _salesunitid; }
            set
            {
                if (_salesunitid == value)
                    return;
                _salesunitid = value;
                if (!PropertyUpdated.Contains("SalesUnitId"))
                    PropertyUpdated.Add("SalesUnitId");
            }
        }
        public virtual long BlandId
        {
            get { return _blandid; }
            set
            {
                if (_blandid == value)
                    return;
                _blandid = value;
                if (!PropertyUpdated.Contains("BlandId"))
                    PropertyUpdated.Add("BlandId");
            }
        }
        public virtual long SeriesId
        {
            get { return _seriesid; }
            set
            {
                if (_seriesid == value)
                    return;
                _seriesid = value;
                if (!PropertyUpdated.Contains("SeriesId"))
                    PropertyUpdated.Add("SeriesId");
            }
        }
        public virtual long ProductionTypeId
        {
            get { return _productiontypeid; }
            set
            {
                if (_productiontypeid == value)
                    return;
                _productiontypeid = value;
                if (!PropertyUpdated.Contains("ProductionTypeId"))
                    PropertyUpdated.Add("ProductionTypeId");
            }
        }
        [Export("促销品")]

        public virtual bool Promotion
        {
            get { return _promotion; }
            set
            {
                if (_promotion == value)
                    return;
                _promotion = value;
                if (!PropertyUpdated.Contains("Promotion"))
                    PropertyUpdated.Add("Promotion");
            }
        }
        [Export("备件")]

        public virtual bool Spare
        {
            get { return _spare; }
            set
            {
                if (_spare == value)
                    return;
                _spare = value;
                if (!PropertyUpdated.Contains("Spare"))
                    PropertyUpdated.Add("Spare");
            }
        }
        [Export("虚拟件")]

        public virtual bool Virtual
        {
            get { return _virtual; }
            set
            {
                if (_virtual == value)
                    return;
                _virtual = value;
                if (!PropertyUpdated.Contains("Virtual"))
                    PropertyUpdated.Add("Virtual");
            }
        }
        [Export("赠品")]

        public virtual bool Free
        {
            get { return _free; }
            set
            {
                if (_free == value)
                    return;
                _free = value;
                if (!PropertyUpdated.Contains("Free"))
                    PropertyUpdated.Add("Free");
            }
        }
        [Export("子件")]

        public virtual bool SubParts
        {
            get { return _subparts; }
            set
            {
                if (_subparts == value)
                    return;
                _subparts = value;
                if (!PropertyUpdated.Contains("SubParts"))
                    PropertyUpdated.Add("SubParts");
            }
        }
        [Export("搜索码")]

        public virtual string SearchCode
        {
            get { return _searchcodel; }
            set
            {
                if (_searchcodel == value)
                    return;
                _searchcodel = value;
                if (!PropertyUpdated.Contains("SearchCode"))
                    PropertyUpdated.Add("SearchCode");
            }
        }
        [Export("条码")]

        public virtual string BarCode
        {
            get { return _barcode; }
            set
            {
                if (_barcode == value)
                    return;
                _barcode = value;
                if (!PropertyUpdated.Contains("BarCode"))
                    PropertyUpdated.Add("BarCode");
            }
        }
        public virtual decimal Rate
        {
            get { return _rate; }
            set
            {
                if (_rate == value)
                    return;
                _rate = value;
                if (!PropertyUpdated.Contains("Rate"))
                    PropertyUpdated.Add("Rate");
            }
        }
    }
}
